package dao;

import pojo.Likes;

import java.sql.SQLException;
import java.util.ArrayList;

public interface LikesDao {
    /**
     * 获取数据库某用户likes表数据
     *
     * @param uid
     * @return
     * @throws SQLException
     * @throws ClassNotFoundException
     */
    ArrayList<Likes> likesList(Integer uid) throws SQLException, ClassNotFoundException;

    /**
     * 用户点赞笔记
     *
     * @param uid
     * @param nid
     * @return
     * @throws SQLException
     */
    boolean UserLikeNote(Integer uid, Integer nid) throws SQLException;

    /**
     * 查找某笔记点赞数
     *
     * @param nid
     * @return
     * @throws SQLException
     */
    Integer noteLikes(Integer nid) throws SQLException;

    /**
     * 取消点赞
     *
     * @param uid
     * @param nid
     * @return
     * @throws SQLException
     */
    boolean UserUnlikeNote(Integer uid, Integer nid) throws SQLException;
}
